/**
 * Created by KaiBo on 2016/7/29.
 */

$('#Frm').bootstrapValidator({
    message: 'This value is not valid',
    feedbackIcons: {
        valid: '',
        invalid: '',
        validating: 'glyphicon glyphicon-refresh'
    },
    fields: {
        goodsname: {
            message: '',
            validators: {
                notEmpty: {
                    message: '账号不能为空'
                }
            }
        },
        typesort: {
            message: '',
            validators: {
                numeric: {
                    message: '只能是数字'
                },
                lessThan:{
                    value:99,
                    inclusive:true,
                    message:'排名数值0~99'
                },
                greaterThan:{
                    value:0,
                    inclusive:true,
                    message:'排名数值0~99'
                }
            }
        },
        discount: {
            message: '',
            validators: {
                numeric: {
                    message: '只能是数字'
                },
                lessThan:{
                    value:1,
                    inclusive:true,
                    message:'折扣数值0~1'
                },
                greaterThan:{
                    value:0,
                    inclusive:false,
                    message:'折扣数值0~1'
                }

            }
        },
        goodsprice: {
            message: '',
            validators: {
                notEmpty: {
                    message: '商品价格不能为空'
                },
                numeric: {
                    message: '只能是数字'
                }
            }
        },
        marketprice: {
            message: '',
            validators: {
                notEmpty: {
                    message: '市场价格不能为空'
                },
                numeric: {
                    message: '只能是数字'
                }

            }
        },
        limitations: {
            validators: {
                numeric: {
                    message: '只能是数字'
                }
            }
        },
        sort: {
            validators: {
                numeric: {
                    message: '只能是数字'
                },
                lessThan:{
                    value:99,
                    inclusive:true,
                    message:'排名数值0~99'
                },
                greaterThan:{
                    value:0,
                    inclusive:true,
                    message:'排名数值0~99'
                }
            }
        },
        templetprice: {
            validators: {
                numeric: {
                    message: '只能是数字'
                }
            }
        }

    }
});
